package com.hsgene.user.service;

import com.hsgene.user.domain.GeneticTestingUserMallAddress;
import com.hsgene.user.domain.SysArea;

import java.util.List;
import java.util.Map;

/**
 * @description:
 * @projectName: hdas-geneshop-server
 * @package: com.hsgene.user.service
 * @author: maodi
 * @createDate: 2018/10/12 10:47
 * @version: 1.0
 * Copyright: Copyright (c) 2018
 */
public interface GeneticTestingUserMallAddressService {

    /**
     * @param
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     * @description 获取大区下拉框数据源
     * @author maodi
     * @createDate 2018/11/8 13:57
     */
    List<Map<String, Object>> selectRegions();

    /**
     * @param regionId 大区id
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     * @description 根据大区value作为的id获取省份下拉框数据源
     * @author maodi
     * @createDate 2018/11/8 13:58
     */
    List<Map<String, Object>> selectProvincesByRegionId(String regionId);

    /**
     * @param
     * @return java.util.List<com.hsgene.user.domain.SysArea>
     * @description 获取所有省(直辖市)列表
     * @author maodi
     * @createDate 2018/10/12 11:23
     */
    List<SysArea> getProvinceAddress();

    /**
     * @param parentId 父级id
     * @return java.util.List<com.hsgene.user.domain.SysArea>
     * @description 根据id获取地址
     * @author maodi
     * @createDate 2018/10/12 11:24
     */
    List<SysArea> getAddressByParentId(String parentId);

    /**
     * @param id 地址id
     * @return com.hsgene.user.domain.SysArea
     * @description 根据id获取地址
     * @author maodi
     * @createDate 2018/10/23 17:17
     */
    SysArea getAddressById(String id);

    /**
     * @param address    地址
     * @param userId     用户id
     * @param id         收货取样地址id
     * @param provinceId 省级id
     * @param cityId     市级id
     * @param districtId 区县级id
     * @return int
     * @description 根据地址和用户id查找数量
     * @author maodi
     * @createDate 2018/10/12 14:11
     */
    int getCountByAddressAndUserId(String address, String userId, String id, String provinceId, String cityId, String
            districtId);


    /**
     * @param userId 用户id
     * @return java.util.List<com.hsgene.user.domain.GeneticTestingUserMallAddress>
     * @description 根据用户名获取收货取样列表
     * @author maodi
     * @createDate 2018/10/12 11:46
     */
    List<GeneticTestingUserMallAddress> getGeneticTestingUserMallAddressByUserId(String userId);

    /**
     * @param userId 用户id
     * @param id     收货/取样地址id
     * @return com.hsgene.user.domain.GeneticTestingUserMallAddress
     * @description 根据收货/取样地址id获取收货/取样地址信息
     * @author maodi
     * @createDate 2018/10/16 16:41
     */
    GeneticTestingUserMallAddress getGeneticTestingUserMallAddressById(String userId, String id);

    /**
     * @param geneticTestingUserMallAddress 收货取样地址信息
     * @return void
     * @description 新增收货取样地址
     * @author maodi
     * @createDate 2018/10/12 11:48
     */
    void insertGeneticTestingUserMallAddress(GeneticTestingUserMallAddress geneticTestingUserMallAddress);

    /**
     * @param id     收货取样地址id
     * @param userId 用户id
     * @return void
     * @description 修改当前id的收货取样地址为默认
     * @author maodi
     * @createDate 2018/10/12 9:28
     */
    void updateGeneticTestingUserMallAddressToDefault(String id, String userId);

    /**
     * @param id     当前收货取样地址id
     * @param userId 当前用户id
     * @return void
     * @description 修改除当前id外的收货取样地址为未默认
     * @author maodi
     * @createDate 2018/10/12 9:14
     */
    void updateOtherGeneticTestingUserMallAddressToNotDefault(String id, String userId);

    /**
     * @param geneticTestingUserMallAddress 收货取样地址信息
     * @return void
     * @description 修改收货取样地址信息
     * @author maodi
     * @createDate 2018/10/11 15:14
     */
    void updateGeneticTestingUserMallAddress(GeneticTestingUserMallAddress geneticTestingUserMallAddress);

    /**
     * @param id 收货取样地址id
     * @return void
     * @description 根据发票id删除收货取样地址信息
     * @author maodi
     * @createDate 2018/10/11 15:14
     */
    void deleteGeneticTestingUserMallAddressById(String id);

}
